|
Technical Q&AOPS 20 - Fixed Math Rounding (17-May-1999)
Q: When I call A: This has to do with the rounding needed to make QuickDraw work correctly on PowerPC-based Macintoshes. The Fixed math routines round up, which in the case of negative numbers is towards zero, so -1.5 rounds to -1, and 1.5 rounds to 2. This behavior is not going to change, and if this causes problems, you will either need to write your own Fixed math routines or wrap the Apple ones to account for the different rounding direction.
-- Mark Cookson Worldwide Developer Technical Support Technical Q&As | Contents Previous Question | Next Question To contact us, please use the Contact Us page. |